No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc. Printed in the United States of America.
The Apple logo is a registered trademark of Apple Computer, Inc.
Use of the “keyboard” Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair competition in violation of federal and state laws.
No licenses, express or implied, are granted with respect to any of the technology described in this book. Apple retains all intellectual property rights associated with the technology described in this book. This book is intended to assist application developers to develop applications only for Apple Macintosh computers.
Apple Computer, Inc.
20525 Mariani Avenue
Cupertino, CA 95014
408-996-1010
Apple, the Apple logo, APDA, AppleTalk, EtherTalk, LaserWriter, LocalTalk, and Macintosh are trademarks of Apple Computer, Inc., registered in the United States and other countries.
FinePrint, PhotoGrade, and TrueType are trademarks of Apple Computer, Inc.
Adobe Illustrator and PostScript are trademarks of Adobe Systems Incorporated, which may be registered in certain jurisdictions.
Centronics is a registered trademark of Centronics Data Computer Corporation.
Bookman, Helvetica, Palatino, and Times are registered trademarks of Linotype Company.
FrameMaker is a registered trademark of Frame Technology Corporation.
Hewlett-Packard and LaserJet are registered trademarks of Hewlett-
Packard Corporation.
IBM is a registered trademark of International Business Machines, Inc.
Garamond, ITC Zapf Dingbats, and Zapf Chancery are registered trademarks of International Typeface Corporation.
Optima is a registered trademark of Linotype AG and its subsidiaries.
University is a registered trademark of Letraset.
Simultaneously published in the United States and Canada.
LIMITED WARRANTY ON MEDIA AND REPLACEMENT
If you discover physical defects in the manual or in the media on which a software product is distributed, APDA will replace the media or manual at no charge to you provided you return the item to be replaced with proof of purchase to APDA.
ALL IMPLIED WARRANTIES ON THIS MANUAL, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE LIMITED IN DURATION TO NINETY (90) DAYS FROM THE DATE OF THE ORIGINAL RETAIL PURCHASE OF THIS PRODUCT.
Even though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, ITS QUALITY, ACCURACY, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD “AS IS,” AND YOU, THE PURCHASER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages.
THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.
Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.
Table 4-2 Type 42 key-value pairs common to all PostScript font dictionaries81
Table 4-3 Entries for Type 1 specific font dictionaries82
Table 4-4 Font dictionary entries specific to Type 42 fonts83
Table 4-5 Optional entries for FontInfo dictionary83
About This Developer Note
The LaserWriter Pro 600 and the LaserWriter Pro 630 are new members of Apple’s LaserWriter printer family. This developer note describes the features and capabilities of the printers, and it is intended for use by software and hardware developers.
To use this note, you need to understand the Adobe™ PostScript™ Level 2 programming language. You should also be familiar with the computer for which you intend to develop software.
You do not need to use this note if you are simply running packaged programs for your Apple computer. However, the note is useful if you are writing or modifying a program that is used with the LaserWriter Pro printer.
Your owner’s guide provides instructions for connecting the printer to your computer, inserting paper, and performing other routine operating tasks. This note does not provide that type of information.
This preface describes the contents of the note, gives visual cues and conventions used in the note, and lists other books to which you can refer.
What This Note Contains
This note is made up of four chapters.
n Chapter 1, “Overview of LaserWriter Pro Hardware,” describes the hardware features of the LaserWriter Pro printer, including the built-in communications ports and interfaces. It also shows how to select printer modes using the rotary mode-selection switch.
n Chapter 2, “Overview of LaserWriter Pro Software,” provides general information about the Adobe PCL (Printer Control Language), LaserWriter Pro driver, the utility program, starting and configuration pages, page types, LaserJet IIP emulation, and modifying mode selection parameters.
n Chapter 3, “LaserWriter Pro Software,” describes the software parameters, resource categories, and PostScript Level 2 operators that enable you to set up and configure the LaserWriter Pro printer.
n Chapter 4, “TrueType Fonts,” describes the TrueType downloadable PostScript font format for the LaserWriter Pro printer.
Conventions Used in This Note
Note
This visual cue is used throughout the book to draw attention to information of general interest. <8bat\>u
IMPORTANT
This type of note contains information that is essential for an understanding of the main text. <8bat\>s
A special font, Courier, is used for characters that you type, or for lines of program code. It looks like this.
Other Reference Material
This developer note assumes that you are familiar with printer technology, and know how to operate and program Apple LaserWriter printers. It supplements the following developer notes:
n LaserWriter IIf and LaserWriter IIg Printers, R0230LL/A, 030-2460-A.
n Personal LaserWriter NTR Printer, R0258LL/A, 030-2664-A
Additional information is available in the following publications:
n The owner’s guide that is shipped with every LaserWriter printer explains how to set up the printer in the standard configuration. The guide gives
basic operating information on how to load toner cartridges, load the paper tray, set up the configuration switch for your communications environ-ment, set up an external hard disk for fonts. It also provides basic trouble-shooting information.
n The LaserWriter Reference, published by Addison-Wesley, describes the capabilities of the LaserWriter Plus, the LaserWriter IINT, and the LaserWriter IINTX printers. It also includes information that is not in this note about fonts and about communicating with LaserWriter printers over the serial channels.
n The PostScript Language Reference Manual, second edition, published by Addison-Wesley, is required if you plan to write programs in the PostScript Level 2 programming language. The edition referenced throughout this note is the Second Edition. There is also a supplement to this manual, referred to as the PostScript Language Level 2 Supplement, or simply the Supplement. This book is available from Adobe Systems, Inc.
n The PostScript Language Tutorial and Cookbook, published by Addison-
Wesley, provides a basic introduction to the PostScript programming language. It also includes sample PostScript programs that help you quickly understand how the PostScript programming language works.
n The PostScript Language Program Design, published by Addison-Wesley, is written for programmers who want to take advantage of the PostScript program language to design efficient PostScript programs and printer devices.
For More Information
APDA is Apple’s worldwide source for over three hundred development tools, technical resources, training products, and information for anyone interested in developing applications on Apple platforms. Customers receive the quarterly APDA Tools Catalog featuring all current versions of Apple development tools and the most popular third-party development tools. Ordering is easy; there are no membership fees, and application forms are not required for most of our products. APDA offers convenient payment and shipping options, including site licensing.
To order products or to request a complimentary copy of the APDA Tools Catalog, contact
APDA
Apple Computer, Inc.
P.O. Box 319
Buffalo, NY 14207-0319Telephone 800-282-2732 (United States)
800-637-0029 (Canada)
716-871-6555 (International)
Fax 716-871-6511
AppleLink APDA
America Online APDA
CompuServe 76666,2405
Internet APDA@applelink.apple.com
Overview of
LaserWriter Pro
Hardware
The LaserWriter Pro 600 and 630 printers are the next-generation replacements for
the LaserWriter II printer. They provide higher print quality, better performance, a
wider range of interfaces, and improved paper handling, at a lower cost than the LaserWriter IIf or the LaserWriter IIg.
Both LaserWriter Pro printers can operate with either Macintosh computers, or with DOS-based IBM personal computers. Both printers are available in 110-volt and 220-volt versions.
This chapter describes:
n hardware features of the printers
n communications ports and interfaces
n mode selection using the rotary switch
Features of the LaserWriter Pro Printer
Table 1-1 lists functional features of the LaserWriter Pro printer. Information listed applies to both the LaserWriter Pro 600 and 630, unless otherwise indicated.
Table 1-1 LaserWriter Pro features(continued)
Features Specifications
Printing speed 8 pages per minute
First print time Less than 18 seconds (full page)
Warm-up time 2 minutes (worst case)
Imaging 300/600 dpi (software switchable)
Fine print and photograde available at 300 dpi
Processor Motorola MC68EC030, 25 MHz
High-capacity paper handling 250-sheet cassette standard
500-sheet cassette optional
75-envelope feeder optional
100-sheet multipurpose tray standard
ROM 4 MB
DRAM 8 MB
Expandable to 16 MB, 20 MB, or 32 MB
Simultaneously active interface ports LaserWriter Pro 600
3 ports: RS-232 Serial, LocalTalk/RS-422, CentronicsLaserWriter Pro 630
Internal and external SCSI ports for hard-disk font storage on the LaserWriter Pro 630
PDL (Page Description Language) PostScript™ Level-II, version 2011, release 130
Emulation Built-in LaserJet IIP emulator. Compatible with PCL (Printer Control Language), Level 4
Communication
The LaserWriter Pro printer supports a variety of communication ports. Figure 1-1 shows the relative positions of these ports on the side panel of the printers. It also
shows the actual vertical orientation of the connectors.
Note
The LaserWriter Pro 600 does not support all ports.u
Figure 1-1 LaserWriter Pro side panel connectors
The controller of the LaserWriter Pro 600 supports host communication via the
following ports:
n Serial RS-422/LocalTalk port
n RS-232 9-pin serial port
n Centronics parallel port
The LaserWriter Pro 630 controller supports host communication via the following ports:
n External SCSI port for a local hard disk drive to store fonts.
n Serial RS-422/LocalTalk port
n RS-232 9-pin serial port
n EtherTalk implemented by the Apple Ethernet adapter
n Centronics parallel port
In addition to the external ports, each printer has an internal SCSI connector that supports an optional internal 2.5-inch hard disk drive used for storing fonts.
All ports are always active. The LaserWriter Pro controller supports simultaneous communication and arbitrates between the ports, accepting only one channel at a time. Simultaneous communication over all I/O channels makes it easier for the LaserWriter Pro to work in multicomputer environments.
Macintosh computers work over the LocalTalk or Ethernet channels, while IBM DOS
or other networked machines can use LocalTalk or EtherTalk. Individual IBM DOS machines or servers can print directly through the Centronics parallel channel or through the RS-232 srial channel.
For information on how to configure the communication ports to suit a particular configuration, refer to the section “Mode Switch,” later in this chapter.
Serial Communications
The LaserWriter Pro printer provides two serial port connectors: one for RS-232C devices, and one for LocalTalk and RS-242 devices.
Serial Port for RS-232C Devices
A 9-pin sub-mini-DIN connector supports communication with RS-232C devices.
Figure 1-2 shows the connector pin designations, and Table 1-2 lists the pin functions for the 9-pin connector.
Figure 1-2 9-pin serial port connector for RS-232C device
Table 1-2 Signal descriptions for 9-pin serial port
Pin
number Signal name Description
1 DCD Data carrier detect. If printer is used with modem, shows that the carrier signal is present.
2 /RXD Receive data (inverted)
3 /TXD Transmit data (inverted)
4 DTR Data terminal ready. Send data when this signal is asserted.
5 GND Ground
6 DSR Data set ready. Indicates the modem is ready. Not used with the LaserWriter Pro printer.
7 RTS Request to send. Flow control signal.
8 CTS Clear to send. Flow control signal.
9 RING Ring signal
LocalTalk/RS422 Serial Connector
An 8-pin mini-DIN supports LocalTalk and RS-242 devices. Figure 1-3 shows the connector pin designations for the 8-pin connector, and Table 1-3 lists the pin functions.
Figure 1-3 8-pin mini-DIN connector for LocalTalk and RS-242 devices
Table 1-3 Signal descriptions for LocalTalk and RS422 serial port
Pin
number Signal name Description
1 HSKo Handshake signal, output
2 HSKi Handshake signal, input
3 /TXD Transmit data (inverted)
4 GND Signal ground
5 /RXD Receive data (inverted)
6 TXD Transmit data
7 GPi General-purpose input
8 RXD Receive data
Centronics Parallel Connector
The LaserWriter Pro 630 provides a 36-pin connector for communication with a standard Centronics parallel interface. Figure 1-4 shows the pin designations for this connector and Table 1-4 lists the signal descriptions.
Figure 1-4 Centronics parallel connector
Table 1-4 Signal descriptions for Centronics parallel port(continued)
Pin
number Signal name Description
1 /DATA STROBE Strobe for input data
2 DATA 1 Data input bit 1
3 DATA 2 Data input bit 2
4 DATA 3 Data input bit 3
5 DATA 4 Data input bit 4
6 DATA 5 Data input bit 5
7 DATA 6 Data input bit 6
8 DATA 7 Data input bit 7
9 DATA 8 Data input bit 8
10 /ACKNOWLEDGE Handshaking output signal; acknowledges receipt of data
11 BUSY Busy output signal; indicates that a /DATA STROBE has been received, but that /ACKNOWLEDGE has not yet been given
12 PAPER ERROR Output status signal. Indicates a paper error
13 SELECT OUT Daisy-chained printer select signal; not used in the LaserWriter Pro printer, which is always selected
14 AUTO FEED Indicates that paper should be fed automatically at the end of each line; not used in PostScript printers
15 SELECT IN Daisy-chained printer select signal. Not used in the LaserWriter Pro printer, which is always selected.
16 SIGNAL GROUND Signal ground
17 CHASSIS GROUND Chassis ground
18 Not used Not used
19-30 SIGNAL GROUND Signal ground
31 /PRIME Reset signal. Host asserts it to cancel the current job on this port.
32 /FAULT Fault signal. Asserted if there is any printer problem that prvents printing, such as a paper jam, or out of paper error.
33-36 Not used Not used
Apple Ethernet Adapter for EtherTalk (630 Only)
The LaserWriter Pro 630 controller supports AppleTalk over the Ethernet network. That communications link is referred to as EtherTalk. A 14-pin connector provides the interface to the Ethernet through Apple’s AUI interface, which allows you to connect to ThinNet, 10-Base-T, and ThickNet cabling systems, using the appropriate Apple Ethernet adapter. Figure 1-5 shows the 14-pin connector, and Table 1-5 lists the signal descriptions.
Figure 1-5 14-pin Ethernet connector
Table 1-5 Signal descriptions for Ethernet connector
Pin
number Signal name Description
1 AAUI5V +5 V power
2 RX+EXT Receive data positive
3 RX EXT Receive data negative
4 GND Ground
5 CD+EXT Carrier detect positive
6 CD EXT Carrier detect negative
7, 8 AAUI5V +5V power
9 TX+EXT Transmit data positive
10 TX EXT Transmit data negative
11 GND Ground
12, 13 Open Open line
14 AAU15V +5 V power
SCSI Connector (630 Only)
The LaserWriter Pro 630 provides connections for up to seven hard-disk drives through a 30-pin, square SCSI connector. These disk drives provide nonvolatile storage for PostScript Level 2 resources, such as fonts. Figure 1-6 shows the pin designations for the connector, and Table 1-6 lists the signal descriptions.
Note
SCSI ID #6 cannot be used for any of these SCSI devices, since it is reserved for the LaserWriter Pro printer.u
Figure 1-6 30-pin SCSI connect
Table 1-6 Signal descriptions for 30-pin SCSI connector(continued)
Pin number Signal name Description
1 Open Open line
2 /DB0 Bit 0 of SCSI data bus
3, 8, 10, 12, 13, 15, 17, 20, 22, 24 GND Ground
4 /DB1 Bit 1 of SCSI data bus
5 Open Open line
6 /DB2 Bit 2 of SCSI data bus
7 /DB3 Bit 3 of SCSI data bus
9 /ACK Handshake signal; acknowledges a request for data transfer
11 /DB4 Bit 4 of SCSI data bus
14 /DB5 Bit 5 of SCSI data bus
16 /DB6 Bit 6 of SCSI data bus
18 /DB7 Bit 7 of SCSI data bus
19 /DBP Parity bit of SCSI data bus
21 /REQ Request for a data transfer
23 /BSY When active (low) indicates that the SCSI bus is busy
25 /ATN When active (low) indicates an attention condition
continued
26 /C/D When active (low) indicates that data is on the SCSI bus; when high indicates that control signals are on the bus
27 /RST SCSI bus reset
28 /MSG When active (low) indicates the message phase is active
29 /SEL Selects between target and initiator
30 /I/O Controls the direction of data movement; when low data is output; when high data is input
or pin designations
Internal SCSI Connector
The LaserWriter Pro printer provides an internal 40-pin SCSI connector. It is mounted on the surface of the printer’s printed circuit board, above the rotary switch. This connector enables you to install an internal 2.5-inch hard-disk drive to store fonts, and other PostScript Level 2 resources. Figure 1-7 shows the relative position of the connector, and the connector pins. Table 1-7 lists the signal assignments for the connector.
Figure 1-7 Internal SCSI connector
Table 1-7 Signal descriptions for internal SCSI connector(continued)
Pin number Signal name Description
1, 2, 24 +5V +5 V power supply
3, 4, 5, 7, 9, 11, 13, 15, 19, 21, 23,
27, 31, 35 GND Ground
6 /DB0 Bit 0 of SCSI data bus
8 /DB1 Bit 1 of SCSI data bus
10 /DB2 Bit 2 of SCSI data bus
12 /DB3 Bit 3 of SCSI data bus
14 /DB4 Bit 0 of SCSI data bus
16 /DB5 Bit 0 of SCSI data bus
17 Open Open line.
18 /DB6 Bit 0 of SCSI data bus
20 /DB7 Bit 0 of SCSI data bus
22 /DB8 Parity bit of SCSI data bus
25 /ATN When active (low) indicates an attention condition
26 /BSY When active (low) indicates that the SCSI bus is busy
28 /SCSIACK Handshake signal; acknowledges a request for data transfer
29 /RST SCSI bus reset
30 /MSG When active (low) indicates the message phase is active
32 /SEL Selects between target and initiator
34 /C/D When active (low) indicates that data is on the SCSI bus; when high indicates that control signals are on the bus
36 /REQ Request for a data transfer
37, 38 MGND Memory ground
39, 40 Motor5V +5 V power supply for motor
Mode Switch
The LaserWriter Pro has a ten-position rotary wheel that allows you to set the printer to work in different communication environments. The first six positions (0–5) allow you to select a set of fixed parameters for each of the communication channels. You cannot change these sets of parameters using the PostScript operators. You may change the remaining sets of parameters (6–9). See Chapters 2 and 3 for further information.
Table 1-8 shows the types of connections and the default parameter values for each switch setting.
Table 1-8 Switch settings and default parameter values(continued)
Switch setting Port name Type of connection and default parameter values Mode
0 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
1 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: DTR
Protocol: raw HP PCL 4
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: raw HP PCL 4
2 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
19200 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
3 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: DTR
Protocol: raw Not arbitrated for input.
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics.
Protocol: raw HP PCL 4
4 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
1200 baud rate
Data bits: 7. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
5 8-pin/RS-422 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
9 pin/RS-232 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
continued
6 8-pin/RS-422 Serial
19200 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
9 pin/RS-232 Serial
19200 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
7 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
1200 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: ETX/ACK
Protocol: normal PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: normal PostScript
8 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
1200 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: DTRF
Protocol: raw HP PCL 4
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics
Protocol: raw HP PCL 4
9 8-pin/RS-422 LocalTalk PostScript
9 pin/RS-232 Serial
9600 baud rate
Data bits: 8. No parity
Stop bits: 1
Flow control: XON/XOFF
Protocol: BSP PostScript
14-pin Apple Ethernet adapter EtherTalk PostScript
36-pin Parallel Centronics.
Protocol: BSP PostScript
You can find out the number of the current switch position by:
n Using the PostScript Level 2 system parameter PrinterMode.
n Choosing Configure Communication from the Utilities menu of the LaserWriter Pro utility program.
n Looking at the switch on the back of the printer.
IMPORTANT
You should change mode switch settings only between jobs. Changing the mode switch during operation immediately affects the printing in progress. The PostScript language interrupt aborts the job, and the printer looks for a new job with the communication parameters designated by the new switch settings, which become active after two seconds. If the host computer continues to run the job that was in progress, the data it sends to the printer may cause unpredictable results.
In addition, if you change the switch settings on a LaserWriter Pro that is connected to an AppleTalk network, other users on the network may not be aware of the new communication parameters, and this could also cause unpredictable results.s
Status Lights
The LaserWriter Pro has four colored lights on the left side of the printer. These lights indicate what the printer is doing. Figure 1-8 shows a view of the status light symbols, and Table 1-8 describes the functions of the lights.
Figure 1-8 Status lights
Table 1-9 Status light messages(continued)
Light Light’s state Printer’s state
Ready/In Use
Green On Off
Flashing The printer is ready to use.Printer cannot print because there is an error condition, or the printer cover is open.Indicates one of several conditions: the printer is warming up, it is printing a startup page, or it is processing data for the next print job.
Low Toner Level
Amber On OffFlashing Toner is low or needs to be redistributed.Toner level is all right.Toner cartridge is installed incorrectly.
Paper Out
Yellow On
OffFlashing Paper tray is empty, or has been removed from the printer.There is an adequate supply of paper in the paper tray.The printer is in manual-feed mode, and is ready for the next sheet of paper.
Paper Jam
Yellow OnOff Flashing There is a paper jam.Paper is feeding correctly through the printer.Printer requires service.
NOTEIf both the Paper Out and Paper Jam lights flash, or if they both stay on,
the printer requires service.
DRAM Expansion
You may expand the LaserWriter Pro printer’s DRAM capacity using SIMM (single in-line memory module) cards, which are plugged in to the slots on the surface of the printer’s main circuit board. As shown in Figure 1-9, there are two slots for SIMM cards. Slot 1 is the slot closer to the edge of the circuit board.
Note
There is no silk-screened identification of these slots.u
To expand DRAM capacity, you must use one of the configurations listed in Table 1-10.
Figure 1-9 Expansion slots for SIMM cards
Table 1-10 DRAM expansion configurations
Total
expansion SIMM card capacity SIMM card type Number of
SIMM cards used Slots used
8 MB 4 MB Single-sided 2 1 and 2
8 MB 8 MB Double-sided 1 1
16 MB 16 MB Single-sided 1 1
20 MB 16 MB
4 MB Single-sided
Single-sided 1
1 1
2
32 MB 16 MB
16 MB Single-sided
Single-sided 1
1 1
2
32 MB 32 MB Double-sided 1 1
Overview of
LaserWriter Pro
Software
This chapter provides an overview of the following software features:
n Adobe PostScript Programming Language
n LaserWriter Pro driver
n LaserWriter Pro utility program
n Startup and configuration pages
n Page types
n LaserJet IIP emulation
n Mode selection
Adobe PostScript Programming Language
The LaserWriter Pro printer uses Adobe PostScript Version 2010.130. This version of
the PostScript language has features and capabilities that might not be present in
other PostScript output devices. This developer note describes only the supplementary PostScript language features of the LaserWriter Pro. You should use the note in con- junction with the PostScript Language Reference Manual (published by Addison Wesley), and the PostScript Language Supplement for Version 2010.
Chapter 3 of this note, “LaserWriter Pro Software,” provides detailed information about the features specific to the LaserWriter Pro.
LaserWriter Pro Driver
The LaserWriter Pro driver and Print Manager provide a general printer interface to the LaserWriter Pro printer. The interface should meet the needs of most Macintosh applications.
The driver
n provides full support for PostScript level 2
n allows the printer to switch between different quality levels
n supports multiple bins, a multipurpose paper tray, and an envelope feeder
n enables the printer to report paper size in the standard and optional cassettes to
the user
n presents printer jam status if reported back by the printer
n supports optical density control through the video interface
n supports both TrueType and Type 1
n is compatible with version 7.X of the Macintosh LaserWriter driver
LaserWriter Pro Utility Program
The LaserWriter Pro utility program shipped with each LaserWriter Pro printer allows you to control and configure the printer. It is similar to the utility for the LaserWriter IIg. Upgrades to the LaserWriter Pro Utility program allow you to:
n select HW Resolution, 300 or 600.
n turn Automatic Tray Switching on and off.
Startup Page
When the LaserWriter Pro printer is powered up, it normally prints a start up page that contains information about the printer’s hardware configuration. The page includes the name and model of the printer, the various communications channel parameters, the number of fonts in ROM, and the total amount of installed RAM.
You can prevent the startup page from being printed using any of the following methods:
n choose Set Startup Page from the Utilities menu in the LaserWriter Utility program.
n set the DoStartPage system parameter of the PostScript Level 2 operator, setsystemparams, to false
n set the PostScript Level 1 compatibility operator dostartpage in statusdict
to false
Configuration Page
The configuration page, shown in Figure 2-1 on page 22, describes the current communications parameters and other values stored in the printer’s nonvolatile memory. You can print the configuration page by choosing Print Configurations Page from the Utilities menu of the LaserWriter Pro Utility program. Table 2-1 on page 23 summarizes the functions of each block in the configuration page.
Figure 2-1 Layout of configuration page
Table 2-1 Configuration page functions(continued)
Block Description
Printer name Shows the printer’s name, as specified by the printername operator. Below the name are the Apple logo and the model name,
LaserWriter Pro 600 or LaserWriter Pro 630.
Communication parameters Indicates which communication protocol the LaserWriter Pro is using:nLocalTalk type
nLocalTalk Node ID
nEthernet Address
Memory parameters Shows how much DRAM is installed, the condition of the EEROM integrity, and a bar graph of memory allocation in the five following categories:ndisplay list
nfont cache
nform cache
npattern cache
nscreen storage
Emulation parameters Shows the following information:navailable emulators and their version numbers, for example LaserJet emulator version: Laser Jet IIP
nstartup page setting, On or Off
nLaserWriter serial number
Switch configurations Shows the parameter values for each of the different switch settings, as listed in Chapter 1, Table 1-8.
Miscellaneous parameters Shows the values of the following parameters, in seconds:njob timeout
nmanual feed timeout
nwait timeoutIt also displaysnthe system administrator’s password; if no password has been assigned, it displays “0” Default
nhalftone screen information: frequency, screen angle, spot function
Page parameters Shows the following page information:ndefault margin offsets, in points
ndefault matrix values of the transformationmatrix, thattransforms user coordinate space into device space
npage sizes, the width and length, in points and inches, of the image areas of the different page types: a4, a4small, b5, legal, letter, lettersmall
Page Types
The page types for the LaserWriter Pro are the same as those described in Chapter 4 of the LaserWriter Reference.
At the beginning of each job, the server selects the default paper tray, as assigned by the defaultpapertray operator. (See “Compatibility Operators for Setting System Parameters,” in Chapter 3.) If the default is the main cassette, the server can detect its size and install the appropriate image region. If the default is the multipurpose tray, the server uses the image region most recently installed by means of the setdefaultmultipurposepapertraysize operator.
When the multipurpose tray is selected in this way, or by using the setpapertray operator, it is treated like the main cassette. Several sheets of paper may be stacked in it, and it feeds continuously until it is empty, at which time the paper-out light comes on. If a job requires a particular paper size, it should invoke one of the paper tray selection operators listed in Table 2-2 before it generates an image. That paper tray selection stays in effect for the duration of the job. The server restores the default paper tray selection when that job is finished.
Table 2-2 Paper tray selection operators(continued)
Operator Description
a4tray Selects the paper tray containing A4-size paper and set the page type to either a4 or a4small, depending on the value of pagetype. This operator raises the PostScript language error rangecheck if no paper tray contains A4-size paper.
b5tray Selects the paper tray containing B5-size paper and sets the page type to b5. This operator raises the PostScript language error rangecheck if no paper tray contains B5-size paper.
legaltray Selects the paper tray containing legal-size paper and sets the page type to legal. This operator raises the PostScript language error rangecheck if no paper tray contains legal-size paper.
lettertray Selects the paper tray containing letter-size paper and sets the page type to either letter or lettersmall, depending on the value of pagetype. This operator raises the PostScript language error rangecheck if no paper tray contains letter-size paper.
LaserJet IIP Emulation
The LaserWriter Pro printer has a built-in Hewlett Packard LaserJet IIP emulator, which is compatible with Hewlett-Packard PCL (Printer Control Language), Level 4. Chapter 3 of this developer note, “LaserWriter Pro Software,” describes the features of the emulator. Chapter 3 of the LaserWriter Reference provides more information on the subject.
Selecting Emulation
You may invoke the emulation in one of three ways. Each method is described briefly below. Before beginning the emulation, the emulate procedure erases the current page and initializes the graphics state. It also clears the operand stack and the dictionary stack.
Running an emulatorconsumes some PostScript virtual memory. If emulate returns normally with no interrupt that virtual memory is reclaimed. If emulate is invoked when there is too little virtual memory, a virtual memory error, VMerror,occurs.You should not call the emulate procedure when the printer is in interactive mode.
Setting the Server to Emulation Mode
You may set the server to an emulation mode, as described in the LaserWriter Reference. This method has the advantage of making the communication protocol the same as that of the printer being emulated. However, it has the disadvantage that the channel must be closed and reopened when you switch modes using the mode switch. When the channel is closed, all buffered data is flushed out, and any data sent from the host before the channel is reopened is lost. This method is not appropriate if the host computer frequently switches between sending PostScript language programs and receiving emulation input.
Selecting From Within a PostScript Language Program
You may invoke the emulation from within a PostScript language program. This method means the host computer can switch back and forth between PostScript language programs and emulation inputs, and both types of data can be in the printer’s input buffer at the same time without data loss.
A PostScript language program can invoke the emulator using a statusdict procedure called emulate. This procedure takes a file and an emulator name from the operand stack. The file is the input source for the emulation. The emulator name operand selects the emulation to be invoked. To select the Hewlett-Packard LaserJet IIP emulator, you must use the name /LaserJet IIP. To maintain compatibility with older printers, the name /hpcl will also select the LaserJet IIP emulator. The following example shows how to select the LaserJet emulator.
currentfile /LaserJetIIP statusdict /emulate get exec
The emulate procedure returns
n at the end of the job
n when a Control-D is encountered in the input source. In this case, that Control-D marks the end of the job
n when <ESC><DEL>-0 is encountered in the input source. In this case, the PostScript interpreter ejects the current page and continues executing whatever was on the execution stack before it executed the emulate procedure. A Control-D must still be sent to terminate the job.
Using a Serial Connection
You may invoke the emulation in binary mode over a serial connection, such as an asynchronous RS-232 or RS-422 connector, or during an AppleTalk PAP (Printer Access Protocol) session.
To invoke the emulation in this way, the rotary switch should be in one of the following positions:
n position 6, 7, 8, or 9, to select the binary protocol on the 25-pin connector
n any position where AppleTalk is selected for the Ethernet or mini DIN-8 port
Note
You cannot use the Normal serial protocol for PostScript
language programs because several of the control characters
have a special meaning.u
LaserJet IIP Emulation Differences
The Hewlett-Packard LaserJet IIP emulation has a number of features that the
LaserJet IIP and LaserWriter implement in different ways. For a complete description of LaserJet Plus emulation, see “Using the Hewlett-Packard LaserJet Plus Emulator,” in Chapter 3 of the LaserWriter Reference.
Mode Selection Parameters
The LaserWriter Pro printer operates in a variety of communications environments. You may select the type of connection (LocalTalk, serial, EtherTalk, parallel) the parameter values (baud rate, and so on), and the mode (PostScript or HP PCL 4), using the ten-position rotary switch on the side panel of the printer. The parameters associated with switch positions 0–5 are fixed and you cannot change them. You will find information about the mode selection rotary switch in Chapter 1, under “Mode Switch.”
You may change the parameters for switch positions 6–9 in one of the following ways:
n By using the appropriate device parameter for the PostScript Level 2 setdevparams operator. Parameters and semantics for setdevparams are described in Chapter 3, under “PostScript Level 2 for the LaserWriter Pro.”
Note
This is the recommended procedure.u
n By using the PostScript Level 2 setsccbatch operator. Information about setsccbatch is provided in Chapter 3, under “Compatibility Operators for Setting SCC Parameters.”
{ currentpagedevice dup /PreRenderingEnhanceDetails get
0 get get /ColorRendering findresource setcolorrendering
}
PhotoGrade Parameters
Three pagedevice parameters contain special information to support the PhotoGrade feature of the LaserWriter Pro printer. They are Install, PreRenderingEnhance, and PreRenderingEnhanceDetails.Table 3-5 defines these parameters.
The PhotoGrade feature improves gray rendering. It does this by controlling special hardware in the printer that converts 4-bit pixels in the frame buffer to pseudo-gray pixels on paper. The feature is available only in the 300 x 300 dpi resolution mode of LaserWriter Pro printer, and only when sufficient memory (8 MB) is available.
Within reasonable limits, you can change user parameters without a special authoriza-tion or password, using any PostScript Language program. User parameters establish temporary policies on issues such as size limits, and inserting new items into caches.
The setuserparams operator sets user parameters, and the currentuserparams operator reads their current values. Unless otherwise indicated, all user parameters are subject to save and restore boundaries. Restore resets all user parameters to their values at the time of the matching save. The initial value of the user parameters when the printer is turned on for the first time depends upon the product. Table 3-9 lists the user parameters present in the LaserWriter Pro printer.
Table 3-9 User parameters(continued)
Key Type Default Details
JobName string () ≤ 32 characters
JobTimeout integer 0 ≥ 0
MaxDictStack integer 530 ≥ 0
MaxExecStack integer 10015 ≥ 0
MaxFontItem integer 12500 ≥ 0
MaxFormItem integer 100000 ≥ 0
continued
MaxLocalVM integer 2147483647 ≥ 0
MaxOpStack integer 10000 ≥ 0
MaxPatternItem integer 20000 ≥ 0
MaxScreenItem integer Varies ≥ 0. Initial value is 3000 bytes per MB of installed RAM, with a maximum of 12000 bytes.
MaxUPathItem integer 5000 ≥ 0
MinFontCompress integer 1250 ≥ 0
VMReclaim integer 0 0, -1, -2
VMThreshold integer 40000 ≥ 0
WaitTimeout integer 0 ≥ 0
NOTERefer to the PostScript Language Reference Manual, and to the PostScript Language Reference Manual Supplement, for further information.
Table 3-16 %EthernetTalk_NVx% communication parameter sets
Key Type Default - all cases Details
EtherTalkType string LaserWriter Parameters refer to the same nonvolatile storage. Changing this parameter changes EtherTalkType for all _NVx sets.
EtherTalkZone string 8 ≤ 31 characters. The characters:@ are not allowed.
EthernetAddress string unique A read-only string of the form XX:XX:XX:XX:XX:XX, that is the Ethernet address of the printer.
Enabled boolean true
Interpreter name PostScript
On boolean true
Table 3-17 %Parallel_NVx% communication parameter sets
Key Type Parallel_NV
defaults Parallel_NV2
defaults Parallel_NV3
defaults Parallel_NV4
defaults
Interpreter name PostScript PostScript LaserJet IIP PostScript
NOTEOutputDevice specifies which communications device is to be used for stdout and stderr. Legal values are %Serial%, %SerialB%, and so on.
The PostScript language has undergone a number of significant extensions. The language is designed to be a universal standard for device-independent page descriptions, but each PostScript language implementation supports features and capabilities particular to that implementation. Appendix D, “Compatibility Strategies,” in the PostScript Language Reference Manual, presents guidelines for taking advantage of language extensions, while maintaining compatibility with PostScript interpreters.
Level 1 implementations provide a collection of device control and system parameter configuration operators and procedures, most of which are defined in the dictionary statusdict. The contents of statusdict are product dependent, although an attempt has been made to maintain a consistent specification for common features. It is the dictionary for product-specific operators and other definitions.
byteorder Syntax – byteorder bool
Definition This operator returns a Boolean value with the same value as the system parameter ByteOrder.
Error stackoverflow
defaultmultipurposetraysize Syntax – defaultmultipurposetraysize name bool
Definition This operator returns the name and bool parameters used with setdefaultmultipurposetraysize to set the default multipurpose tray size. The standard for this operator is
/lettertrue.
Error stackoverflow
defaultpapertray Syntax – defaultpapertray tray
Definition This operator returns the default paper tray number set by setpapertray.
Definition This operator returns the following: nsystem parameter JobTimeout for job nsystem parameter WaitTimeout for wait npage device parameter ManualFeedTimout for manualfeed
Error stackoverflow
Syntax – dostartpage bool
Definition This operator returns the value of the system parameter DoStartPage.
Error stackoverflow
dostartpage
papersizeSyntax – papersize name bool
Definition This operator returns the name of the operator that selects a tray containing paper of the current size. For example, if the current paper size is letter, this operator returns the value /lettertray. The value of bool is true if the page feeds short edge first, false if the page feeds long edge first. For the LaserWriter Pro printer, the value of bool is always true. If there are two paper trays installed, and you execute the operator returned by papersize at a later time, it may not choose the same tray, if both trays have the same size paper installed.
Error stackoverflow
realformat Syntax – realformat string
Definition This operator returns a string with the same value as the system parameter RealFormat.
Definition This operator returns the following: nsystem parameter JobTimeout for job nsystem parameter WaitTimeout for wait npage device parameter ManualFeedTimout for manualfeed
Definition This operator returns the x and y components of the page device Margins parameter as left and top, respectively.
Error stackoverflow
pagestackorderSyntax – pagestackorder bool
Definition This operator returns the logical complement of the page device OutputFaceUp Boolean parameter
Error stackoverflow
setmargins Syntax top left setmargins –
Definition This operator sets the page device Margins parameter to [left top].
Errors rangecheck, stackunderflow, typecheck
setpagestackorder Syntax bool setpagestackorder –
Definition This operator sets the page device OutputFaceUp parameter to the logical complement of bool. For example, if bool is true, OutputFaceUp is set to false.
Errors stackunderflow, typecheck
This section describes the compatibility operators that set Level 2 user parameters.
Table 3-9 provides additional information about these operators.
jobname Syntax – jobname string
Definition This operator is a string with the same value as the user parameter JobName. If you redefine either jobname or the user parameter JobName, the other is redefined to the same value.
Error stackoverflow
jobtimeout Syntax – jobtimeout int
Definition This operator returns the value of the user parameter JobTimeout.
Error stackoverflow
setjobtimeout Syntax int setjobtimeout –
Definition This operator sets the user parameter JobTimeout to the value of int.
Error stackoverflow
waittimeout Syntax – waittimeout int
Definition This operator is an integer with the same value as the user parameter WaitTimeout. Redefining either waittimeout or the user parameter WaitTimeout redefines the other to the same value.
Error stackoverflow
diskstatusSyntax – diskstatus freetotal
Definition This operator returns the total number of pages free for all writable disk devices. A page is 1024 characters.
Definition This operator initializes each writable disk, setting the disk device parameters as follows:nLogicalSize to the value of pagesnInitialize action to action + 1
Definition This operator is a Boolean that works in conjunction with the page device parameter ManualFeed to determine whether a page is to
be fed manually. If either manualfeed or ManualFeed is true at
the time of a showpage or copypage, than that page will be fed manually. Otherwise, the page will not be fed manually. The manualfeed compatibility operator is present in statusdict only if the page device parameter ManualFeed is defined for the product. The initial value of manualfeed when the printer is powered up
is false.
Error stackoverflow
manualfeedtimeoutSyntax – manualfeedtimeout int
Definition This operator is an integer that works in conjunction with the page device parameterManualFeedTimeout to determine the manual feed timeout for any given page. By default, manualfeedtimeout is not defined in statusdict. In that case, the value of the page device parameter ManualFeedTimeout is used to determine the timeout value. If a job has defined manualfeedtimeout to be an integer value in statusdict, then this value will be used instead of ManualFeedTimeout for the timeout value.
Error stackoverflow
setuserdiskpercentSyntax int setuserdiskpercent -
Definition This operator pops int off the stack. It is not operative in the LaserWriter Pro printer.
Error stackunderflow, rangecheck, typecheck
softwareiomodeSyntax – softwareiomode int
Definition This operator returns int, which indicates the interpretation mode for the current communications device. See setsoftwareiomode.
Error stackoverflow
sccbatch Syntax channel sccbatch baud options
Definition This operator returns the serial communications device parameter settings. The values are from one of the following two parameter sets: n%SerialB_NV%, if channel equals 9,
n%Serial_NV%, if channel equals 25baud and options affect the following device parameters: nBaud, StopBits, and FlowControl nDataBits and Parity nCheckParitySee “setsccbatch” for further information.The values for data bits and parity are determined by the bit positions defined in Tables 3-25 and 3-26. (See the next section, “SCC Operator Encoding.”)Baud, stop bits, and flow control are determined respectively by the corresponding settings for Baud, StopBits, and FlowControl device parameters.
The LaserWriter Pro printer has built-in TrueType font-scaling software. This chapter describes the behavior of the TrueType downloadable PostScript font format as it applies to the LaserWriter Pro printer, which is described as a Type A Device. In defining requirements for the LaserWriter Pro printer, this chapter also provides information on other LaserWriter printers and PostScript devices that do not have the built-in TrueType font scaler. These printers are referred to in this chapter as Type B and Type C devices.
Note
In this context, the term “device” is used to refer to a laser printer. <8bat\>u
The TrueType font format is efficient and produces high-quality print. Designed to
be as universally standardized as possible, it is nevertheless constrained by PostScript implementations in older printers. To support current users, the TrueType implementa-tion is designed to run efficiently on the large installed base of LaserWriter printers.
Future printers may be optimized to take advantage of any enhancements to TrueType, and the format is designed to allow these enhancements to be incorporated easily and dynamically.
The TrueType format places all PostScript devices in one of three classes:
n Class A devices are those with a TrueType scaler embedded in the PostScript device. The LaserWriter Pro printer is a Class A devices.
n Class B devices are those with TrueType font-scaling code downloaded to the device separately from the font itself.
n Class C devices do not have TrueType available in any form, for example, third-party PostScript compatible printers.
The downloadable TrueType font format can be used on any class device. However, performance and quality characteristics may vary widely. Because their inherent inability to use the TrueType enhancements, Class C devices show performance and quality degradations. All third-party 68000-based Adobe PostScript printers are treated as Class B devices, since they can handle downloaded assembly code.
TrueType Font Format
The TrueType PostScript format incorporates three components:
n TrueType code
n a small set of procedures, referred as the patch, which are used only during
TrueType processing
n TrueType font for font definition
TrueType Code
The TrueType font-scaling code is partitioned into three pieces and sent to the device on demand for each document that uses an 'sfnt' (scalable font) resource. The code is encrypted using the Adobe encryption mechanism and depends on the existence of the eexec and cexec operators.
Because of the way the code is encrypted, the downloadable TrueType code can be used only on Class B devices and is discarded on all other classes of devices.
You should note the following three requirements:
n If eexec and cexec are defined on a printer, their implementation must be compatible with Adobe PostScript.
n Since the TrueType code is encrypted 68000-family code, it will not run on a printer that is not based on the 68000 family of processors.
n In the case of the LaserWriter 7.0 driver, the amount of available virtual memory (VM) on the printer when the driver first encounters an 'sfnt'resource in a document is a factor in deciding whether the TrueType code is downloaded. If the printer has less than 120,000 bytes of VM available, the TrueType code will not be downloaded.
Because it is relatively large, TrueType code is partitioned into three physical pieces in the LaserWriter 7.0 driver. When this code is downloaded, four new operators are defined in PostScript. A PostScript dictionary, TrueDict, is created in which those four operators (as well as some version information) are stored. One operator is used to initialize TrueType for each new 'sfnt'resource, and the others are used within the BuildChar procedure in the font.
The TrueType code renders characters in either bitmap or PostScript path form. The path form is invoked only when a character path is required during rendering via charpath or an outline (PaintType 2) style. If the bitmap size for a character exceeds 10,000 bytes (which is roughly the memory needed for a 100-point character at 300 dpi), the scaler is asked to band the bitmap, and the character is printed in bands. Future drivers or other applications may download different operators. If so, these operators will have different names if their semantics differ from those defined by the LaserWriter 7.0 driver. The entries in the font dictionary for a Class B printer (defined in “TrueType Font Dictionary Entries” later in this chapter) remain the same.
Patch
The patch, redefines the PostScript charpath operator. It signals whether characters are to be rendered using the PostScript path or via a bitmap. The patched charpath simply sets a global flag to signal that charpath is in effect. This flag is then examined when characters are being rendered. If the flag is true, the characters are always constructed using a PostScript path rather than a bitmap.
Note
As with the TrueType code, the redefinition of PostScript operators is ignored on Class A and Class C devices. <8bat\>u
TrueType Font Definition
The third component is the actual TrueType font. The font has the minimum but essential parts of a normal PostScript font: a font dictionary containing a font type, font matrix, font bounding box, and an encoding vector. In addition, the font should contain a font name, paint type, stroke width (for outline styles), the TrueType 'sfnt' (font data) as it exists in the 'sfnt' resource on the host, and for Class B devices only, the TrueType state information and a BuildChar procedure. The major bulk of the font is the 'sfnt' font data.
The FontType entries for the three different classes of devices are as follows:
n For Class A devices, such as the LaserWriter Pro printer, the TrueType font is 42, and the BuildChar procedure is therefore implicit. For example, based on the FontType entry, the font-rendering machinery will know where to find, and how to execute, the font data. The Type 42 font format is described in “TrueType Font Dictionary Entries,” later in this chapter.
n For Class B devices, the FontType entry is 3, indicating that it is a user-defined font as understood by PostScript.
n For Class C devices, the FontType entry is 1.
The TrueType font has a UniqueID entry, a 24-bit number derived from the checksum in the 'sfnt' header. The presence of UniqueID in the font makes the PostScript font cache operate more efficiently and avoids rerendering characters across jobs. Two UniqueID entries are given to the font, one for the hinted font (Class A or Class B) and the other for the unhinted font (Class C). The UniqueID for a Class C font is further restricted to be in the range between 4000000 and 4999999. This range is reserved as an open range by the Type 1 specification. Only one ID is used on any particular printer. Providing two UniqueID entries helps to avoid a situation where even though the printer is capable of rendering hinted characters, it receives unhinted characters that were stored in the font cache by a previous job. This could happen if the previous job did not have enough memory to download TrueType code.
The 'sfnt' array can contain any number of data strings, no single one of which can be larger than 65,536 bytes. The 'sfnt'array is divided into the required number of pieces at arbitrary table or glyph boundaries within the 'sfnt'. To guarantee word alignment of the data, there is always one extra byte at the end of each string in the 'sfnt' array. The strings are internally linked or combined at run time to simulate a continuous string of data. There is no loss in performance speed because of this restriction in string size. The 'sfnt' data exists in two forms: the actual 'sfnt' data straight out of the 'sfnt' resource and the unfolded glyph data (as Type 1 CharStrings) for Class C devices. The printer ignores the data it does not need so that the font size as it is stored on the printer is not increased.
The entries in a TrueType font dictionary for a Class A or Class B printer are listed and described in “TrueType Font Dictionary Entries,” later in this chapter. The font dictionary for a Class C printer follows the Adobe Systems, Incorporated, Type 1 font format specification.
Device Operation
There are three classes of printers, known as Class A devices, Class B devices, and Class C devices. The subject of this developer note, LaserWriter Pro printer, is a Class A device. This section describes how TrueType fonts are handled on Class A printers. It also describes how TrueType fonts are handled on Class B, and Class C devices, to provide definition by comparison for the LaserWriter Pro printer.
Class A Devices
On Class A devices, such as the LaserWriter Pro printer, the downloadable TrueType code is extraneous data and is discarded when the printer determines it is not needed. Any low-level patches are similarly discarded. A system-level operator or flag on
Class A devices is invoked to determine whether the TrueType code and patches are needed. The entries and behavior of Type 42 fonts are intended to be very similar to the LaserWriter built-in PostScript fonts (Type 1). Like Type 1 fonts, Type 42 fonts have an implicit BuildChar procedure, as opposed to the explicit BuildChar entry for
Type 3 fonts.
When a character bitmap is needed from a Type 42 font, the character cache is checked first. If the bitmap is not cached, the character code is used as an index into the font’s encoding array, returning a character name. This name is used as an index into the CharStrings dictionary, which is a required entry in the font dictionary. The value corresponding to the character name is an integer, representing the glyph index in the 'sfnt'resource. The 'sfnt'resource has a table for mapping character codes to glyph indexes, but PostScript allows an extra level of indirection in this mapping to reencode fonts. The glyph index and the 'sfnt' data itself from the scalable fonts entry are used to rasterize the character.
Adobe built-in font formats (Type 1) have a capability called charstring procedures, that allows user-defined characters to be added to the CharStrings dictionary. If the value of the CharStrings entry corresponding to a character name is an executable array (procedure), the following steps take place:
1. The systemdict dictionary and the font dictionary are pushed onto the dictionary stack.
2. The character code is pushed onto the operand stack.
3. The procedure is executed.
4. The systemdict dictionary and the font dictionary are popped from the
dictionary stack.
The semantics of the procedure are almost identical to those of the Type 3 font format BuildChar procedure, except that in the Type 3 procedure, nothing is pushed onto the dictionary stack and the font dictionary is passed onto the operand stack. The contents of the procedure must follow the same rules as the Type 3 font format BuildChar procedure with respect to setcharwidth, setcachedevice, and so on. This behavior has existed in all PostScript font formats, but it has only been documented as part of Level 2. This behavior is part of Type 42 BuildChar.
Class B Devices
Class B devices provide the primary motivation and design center for the TrueType font format in its current configuration. The small low-level patches are downloaded to
Class B devices to assist the TrueType code in its operation and to provide the necessary hooks into the PostScript code. The definitions provided here are downloaded in the userdict at the beginning of every job.
As stated earlier, TrueType code is downloaded on demand. If the eexec and cexec operators are provided, their implementation must be compatible with Adobe PostScript, or TrueType will not print on that implementation. Depending on the level
of compatibility, a PostScript error may be raised, or the printer may crash.
Since the content of the font on a Class A device may differ from that on a Class B
or Class C device, executing a PostScript forall operation within the context of a TrueType font dictionary produces different results on different machines. This should not be of significant concern, since the main contents and required definitions are
the same.
Class C Devices
One crucial assumption made by the TrueType code is that all Class C devices support the Adobe Type 1 font format. TrueType cannot be printed on a PostScript-compatible printer that cannot interpret the Type 1 font format. An alternative solution (not documented in this note) would allow TrueType characters to be printed on any PostScript-compatible device by downloading a Type 3 (user-defined) font with a BuildChar procedure. This would convert TrueType data into cubic Bezier curves
to be filled by PostScript. This is not an efficient solution. With Adobe Systems, Incorporated making the Type 1 font format public, more PostScript-compatible printers will support the Type 1 format and therefore print TrueType.
Downloading TrueType Fonts to Disk
TrueType fonts may be downloaded to printers equipped with hard disk drives that store fonts. The entire font may be stored and used just like any other PostScript font, or, depending on the intelligence of the font-downloading utility, the font can be stripped of unnecessary items that will not be used on a particular class of printer. To facilitate the operation of intelligent font downloaders, there are several conventions that must be used for the textual definition of the font.
where sfntFormat is the version number of the 'sfnt' format (from the 'sfnt' header), fontRevision is the font manufacturer’s revision of the font (also from the 'sfnt' header), and commentFormat refers to this version of the commenting convention. An intelligent downloading utility can use this line to identify TrueType fonts on a printer’s hard disk.
If this line appears as the first line of a font program, the following conventions must be strictly followed or an error may occur.
n The token /sfnts must be followed by the token [and either < or (, depending on the encoding of the binary 'sfnt' data. There may be whitespace and/or control characters (<CR>, <LF>, <TAB>) between these tokens.
n All of the strings defined in the 'sfnt' array of a font program must use the same encoding (ASCII or ASCIIHex). Different font programs may use different encodings.
n The characters representing the 'sfnt' data must follow a sequence of N characters of data followed by M characters of whitespace, repeating until the string’s data is exhausted. The last sequence of character data may be less than N characters long. The last tokens in each string should be M characters of whitespace, followed by the character(s) for 1 pad byte of data, followed immediately by the string terminator (either > or), depending on the data encoding. There may be whitespace and/or control characters between string definitions. The values of M and N must be constants for a font program. Different font programs may use different values of M and N. The value for N must be between 0 and 2048, inclusive.
Note
The 1024 bytes of binary 'sfnt' data require 2048 characters to represent them in the ASCII Hex encoding. <8bat\>u
n The last string definition in the 'sfnt' array must be followed by the token ] and the token def. There may be whitespace or control characters, or a combination of whitespace and control characters, between these tokens.
n The PostScript code for different classes of printers must be bracketed with begin and end comments. The end comments are already used by the checkload and fcheckload procedures when discarding sections of PostScript code that are not appropriate for a given class of printer. The begin comments are for the font downloader, which does not have a PostScript interpreter to do the discarding automatically. Because of a limitation in the readline operator in early versions of the PostScript interpreter, the end comments must be bracketed by only linefeed (ASCII 10) characters.
Table 4-1 lists the comments that delineate sections of code and indicates the classes of printers for which they are required. <SP> indicates the space character. You must enter a space at the beginning of each end comment line.
Table 4-1 Section code comments
Comments Description
%beginsfnt
<SP>%endsfnt These comments bracket the creation of the common entries in the font dictionary for Class A and Class B devices. It may be discarded on Class C devices.
%beginsfntBC
<SP>%endsfntBC These comments bracket the definition of entries specific to Class B (TrueState and BuildChar) in the TrueType font dictionary. They may be discarded on Class A and Class C devices.
%beginsfntdef
<SP>%endsfntdef These comments bracket the call to definefont, which registers the font dictionary for Class A and Class B devices. They may be discarded on Class C devices.
%beginType1
<SP>%endType1 These comments bracket the definition of the Type 1 font dictionary for Class C devices. They may be discarded on Class A and Class B devices.
TrueType Font Dictionary Entries
In the Macintosh system software, TrueType fonts are represented as a resource, called 'sfnt' for scalable font. In PostScript interpreters, fonts are represented as dictionaries with certain special key-value pairs. One of these entries, FontType, identifies the font format and tells the PostScript font mechanism how to interpret the remaining entries. The FontType entry for TrueType fonts on Class A devices is 42. This section describes the remaining entries and their semantics for Type 42 font dictionaries.
The following tables represent possible entries in a TrueType font dictionary for Class A or Class B devices. Class C devices use the Type 1 font format, as documented by the PostScript Language Reference Manual. Certain entries are required either only for Class A devices or only for Class B. Other entries have different values, depending on the type of device. Still others are optional and are not used by the font-rendering code itself.
A valid Type 42 font dictionary must have certain key-value pairs. Table 4-2 lists the entries common to all PostScript fonts. Table 4-3 lists Type 1 specific entries. Some of these are supported in exactly the same way as in Type 1, and others are ignored by Type 42 fonts. Table 4-4 lists the entries specific to Type 42 font dictionaries. Table 4-5 lists the entries in the optional FontInfo dictionary and indicates where the corresponding information is found in the 'sfnt' format.
Table 4-2 Type 42 key-value pairs common to all PostScript font dictionaries(continued)
Key Type Semantics
Encoding array Required. An array of 256 names that maps character codes (integers) to character names. Note that Apple TrueType fonts have an encoding vector different from the StandardEncoding used by Type 1 fonts. Conventional value: derived from information in the 'sfnt' post table.
FontBBox array Required. An array of four numbers in the character coordinate system giving lower-left x, lower-left y, upper-right x, and upper-right y of the font bounding box. To ensure compatibility with certain versions of the LaserWriter driver, this array should have the executable attribute.
FontInfo dictionary Optional. This entry is for information only. FontInfo is not used by the PostScript interpreter. See Table 4-5 for the entries that can be included in this dictionary.
FontMatrix array Required. Transformation matrix for transforming the character coordinate system into the user coordinate system. TrueType fonts maintain this value internally (for example, Apple TrueType fonts use a 2048-unit coordinate system), so the PostScript coordinate system transformation is the identity matrix. Value for Type 42 fonts: [100100]Note that certain PostScript programs (for example, program 16 in the PostScript Language Tutorial and Cookbook) incorrectly assume that all PostScript fonts have a 1000-unit coordinate system. These programs may exhibit incorrect behavior when used with Type 42 fonts.
FontName name Optional. This entry is for information only. FontName is not used by the PostScript interpreter. Conventional value: PostScript name from the 'sfnt' name table
FontType integer Required. Indicates where the information for the character descriptions is found and how it is represented. Value for TrueType fonts: 42
LanguageLevel integer Optional. This integer indicates the minimum language level required for correct behavior of the font. This entry is for information only. LanguageLevel is not used by the PostScript interpreter. Default value: 1
UniqueID integer Optional. An integer in the range 0 to 16777215 (224 – 1) that uniquely identifies this font for the purposes of caching character bitmaps and metrics. Conventional value: the lower 24 bits of the 'sfnt' checksum.
continued
WMode integer Optional. Indicates which of two sets of metrics is used when characters are shown from this font. If this entry (or the WMode entry of the root font from which this font is a descendant) has
the value 1, then this font must have a CDevProc entry (see
Table 4-3). See Section 5.9 of the PostScript Language Reference Manual, for information about composite fonts. Default value: 0
XUID array Optional. An array of integers that uniquely identifies this font or any variant of it for the purposes of caching character bitmaps and metrics.
Table 4-3 Entries for Type 1 specific font dictionaries(continued)
Key Type Semantics
CharStrings dictionary Required. Associates character names (keys) with glyph IDs (integers). These IDs access data in the 'sfnt' format. Every Type 42 font must have a notdef entry (usually with glyph ID 0). The value can also be an executable PostScript procedure. See Section 5.6.3 of the PostScript Language Reference Manual.
CDevProc procedure Optional. A procedure that derives global changes algorithmically from a font’s metrics. If this font (or the root font for which this font is a descendant) has a WMode of 1, this entry is required. See Section 5.6.2 of the PostScript Language Reference Manual, for the semantics of this procedure.
Metrics dictionary Ignored. Adding a Metrics entry will have no effect on a
Type 42 font.
Metrics2 dictionary Ignored. Adding a Metrics2 entry will have no effect on a
Type 42 font.
PaintType integer Required. A code indicating how the characters of the font are to be painted:0 The character outlines are filled.2 The outlines (designed to be filled) are stroked.TrueType fonts are ordinarily created with a PaintType of 0. A program desiring to convert it to a stroked outline font can copy the font dictionary, change the PaintType from 0 to 2, add a StrokeWidth entry, and define a new font using this dictionary.Note that if PaintType 0 is chosen, the TrueType scan con- verter is used to render the character. If PaintType2 is chosen, the grid-fitted TrueType outline is converted to PostScript path segments and the PostScript scan converter strokes the path.
Private dictionary Ignored. Type 42 fonts do not require a Private dictionary.
continued
StrokeWidth number Optional. Indicates the stroke width (in units of the character coordinate system) for stroked outline fonts (PaintType 2). This field is not initially present in filled font descriptions. It must be added when creating a stroked font from an existing font.Note that certain PostScript programs (for example, program 16 in the PostScript Language Tutorial and Cookbook) incorrectly assume that all PostScript fonts have a 1000-unit coordinate system. These programs may exhibit incorrect behavior when used with Type 42 fonts.
.
Table 4-4 Font dictionary entries specific to Type 42 fonts(continued)
Key Type Semantics
sfnts array Required. An array of PostScript string objects that contains the font description in the 'sfnt' format. Because PostScript strings can be no more than 65,535 bytes long, 'sfnt' descriptions that are longer than 65,535 bytes must be broken into separate strings. The 'sfnt' data should be divided at both a longword and a table boundary. If a single table exceeds 64K bytes, it should be divided at the nearest longword and glyph boundary. For compatibility with certain versions of the LaserWriter driver, each string in the 'sfnt' array must contain a single pad byte at the end.
Table 4-5 Optional entries for FontInfo dictionary(continued)
Key Type Semantics
FamilyName string Name for a group of fonts that are stylistic variants of a single design. All fonts that are members of such a group should have exactly the same FamilyName. Conventional value: font family name from the 'sfnt' name table.
FullName string Unique name for an individual font. Conventional value: full font name from the 'sfnt'
name table.
isFixedPitch boolean If true, indicates that the font is a fixed-pitch (monospaced) font. Conventional value: isFixedPitch Boolean value from the 'sfnt' post table.
ItalicAngle number Angle in degrees counterclockwise from the vertical of the dominant vertical strokes in the font. Conventional value: italic angle from the 'sfnt' post table.
continued
Notice string Trademark or copyright notice, if applicable. Conventional value: copyright notice from the 'sfnt'
name table.
UnderlinePosition number Recommended distance from the baseline for positioning underlining strokes. This number is the y coordinate (in character space) of the center of the stroke. Conventional value: underline position from the 'sfnt' post table.
UnderlineThickness number Recommended stroke width for underlining, in units of the character coordinate system. Conventional value: underline thickness from the 'sfnt' post table.
version string Version number of the font program. Conventional value: Version string from the 'sfnt' name table (not the version entry in the 'sfnt' post table).
Weight string Name for the weight, or boldness, attribute of a font. Conventional value: font subfamily name from the 'sfnt' name table.